
**** Returns to Scale from Labor Specialization: Evidence from Asset Management Mergers (Luo, Manconi and Schumacher) *************
*Purpose: Generate Table 5

**Define macros 
global controls "firmsize fundsize volatility expenses pastreturn" 

**-------------------TABLE 5-------------------**
clear all
use "$datapath\matchingsample_managerlevel.dta"

qui foreach n in lognoofstyles concentration lognoofremovedstyles lognoofaddedstyles logaum logaumpercapita{
qui reghdfe `n' c.treat##c.post##c.largedelta $controls, a(deal_id#managerid deal_id#time) cluster(deal_id time)
estadd local deal_manager Y 
estadd local deal_time Y 
estadd local ctrl Y
estimates store `n'
}

esttab lognoofstyles concentration lognoofremovedstyles lognoofaddedstyles logaum logaumpercapita using "$outputpath/Table5.rtf", replace ///
keep(c.treat#c.post#c.largedelta c.treat#c.post) ///
order(c.treat#c.post#c.largedelta c.treat#c.post) ///
b(%5.3f) t(%5.2f) nolines noeqlines nolabel nogaps ///
stats(deal_manager deal_time ctrl r2 N, fmt(0 0 0 3 %9.0gc)) ///
starlevels(* 0.10 ** 0.05 *** 0.01) nonotes varwidth(15) modelwidth(10) noomitted 

